package com.t2two.example.enums;

/**
 * @version 1.0
 * @description: TODO
 * @author: lifei
 * @date: 2024/6/7 9:56
 */
public enum CompanySubordinateEnum {
    center("center","中央驻德"),
    shandong("shandong","省驻德"),
    city("city","市本级"),
    decheng("decheng","德城区"),
    lingcheng("lingcheng","陵城区"),
    yucheng("yucheng","禹城市"),
    laoling("laoling","乐陵市"),
    ninjin("ninjin","宁津县"),
    qihe("qihe","齐河县"),
    linyi("linyi","临邑县"),
    pingyuan("pingyuan","平原县"),
    wucheng("wucheng","武城县"),
    xiajin("xiajin","夏津县"),
    qinyun("qinyun","庆云县"),
    tianqu("tianqu","天衢新区"),
    other("other","其他"),

    ;
    private String key;

    private String value;

    CompanySubordinateEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public boolean checkCompanySubordinate(String key) {
        // 判断当枚举类型为 center、shandong、city 或 other 时返回 true
        if (CompanySubordinateEnum.center.getKey().equals(key)
                || CompanySubordinateEnum.shandong.getKey().equals(key)
                || CompanySubordinateEnum.city.getKey().equals(key)
                || CompanySubordinateEnum.other.getKey().equals(key)) {
            return true;
        } else {
            return false;
        }
    }
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
